<?php
/**
 * @Author: liuhongbin
 * @Email: 514660094@qq.com
 * @Date: 2019-02-12 16:15:10
 * @Description:
 * @LastEditors: liuhongbin
 * @LastEditTime: xxx
 */

namespace app\common\model\wechat\tralts;


use app\common\model\addon\Addons;
use app\common\model\platform\Platform;
use app\common\model\wechat\WechatRefund;
use app\common\model\wechat\WechatUser;

trait WechatModel
{
    public function refund()
    {
        return $this->hasOne(WechatRefund::class, 'out_trade_no', 'out_trade_no');
    }

    public function user()
    {
        return $this->hasOne(WechatUser::class, 'openid', 'openid');
    }

    public function addons()
    {
        return  $this->hasOne(Addons::class, 'name', 'addon');
    }
}